package StaticDemo;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        Student s1 = new Student("zhangsan",23,"nan");
        Student s2 = new Student("xiaoming",25,"nan");
        Student s3 = new Student("luhua",12,"nv");
        list.add(s1);
        list.add(s2);
        list.add(s3);
        //用类名调用工具类的方法
        int maxAgeStudent = StudentUtil.getMaxAgeStudent(list);
        System.out.println(maxAgeStudent);
    }
}
